import sqlite3

# YUN_YING_CONN = "mysql+pymysql://yyzw:5ZYY5w88.@47.103.117.175:3306/"
# KAN_BAN_CONN = "mysql+pymysql://yyzw:y5WZy588.@106.14.99.229:3306/"
with sqlite3.connect("../data.sqlite") as con:
    res = list(con.execute("SELECT * FROM rd"))
    YUN_YING_CONN = f"mysql+pymysql://{res[0][0]}:{res[0][1]}@47.103.117.175:3306/"
    KAN_BAN_CONN = f"mysql+pymysql://{res[1][0]}:{res[1][1]}@106.14.99.229:3306/"
    APPLET = f"mysql+pymysql://{res[2][0]}:{res[2][1]}@47.103.137.28:3306/"


NOBUG = """
 * **************************************************************************
 * ********************                                  ********************
 * ********************      COPYRIGHT INFORMATION       ********************
 * ********************                                  ********************
 * **************************************************************************
 *                                                                          *
 *                                   _oo8oo_                                *
 *                                  o8888888o                               *
 *                                  88" . "88                               *
 *                                  (| -_- |)                               *
 *                                  0\  =  /0                               *
 *                                ___/'==='\___                             *
 *                              .' \\|     |// '.                           *
 *                             / \\|||  :  |||// \                          *
 *                            / _||||| -:- |||||_ \                         *
 *                           |   | \\\  -  /// |   |                        *
 *                           | \_|  ''\---/''  |_/ |                        *
 *                           \  .-\__  '-'  __/-.  /                        *
 *                         ___'. .'  /--.--\  '. .'___                      *
 *                      ."" '<  '.___\_<|>_/___.'  >' "".                   *
 *                     | | :  `- \`.:`\ _ /`:.`/ -`  : | |                  *
 *                     \  \ `-.   \_ __\ /__ _/   .-` /  /                  *
 *                 =====`-.____`.___ \_____/ ___.`____.-`=====              *
 *                                   `=---=`                                *
 * **************************************************************************
 * ********************                                  ********************
 * ********************      				 ********************
 * ********************         佛祖保佑 永远无BUG       ********************
 * ********************                                  ********************
 * **************************************************************************
"""


# 邮件中间人
EMAIL_MAN = {
    'username': '15022336916@163.com',
    'password': '72hHH1izZ',
    'host': 'smtp.163.com',
    'port': 465
}

# 任务的配置文件
CONFIG_YML = {
    'owner': "请填写你的名字",
    'driverDebug': False,
    "executable_path": None,
    'windowSize': '--window-size=1920,1080',
    'server': "47.103.117.175",
    'port': 22,
    'logFiles': [
        'DrivingRecord/steps_logs/steps.log', 'DrivingRecord/steps_logs/error.log',
        'DrivingRecord/config/cookie.json', 'DrivingRecord/steps_logs/异常截图.png'
    ],
    'cut': 20
}

